package kr.co.icebird.spring3.config.util;

import org.jfree.chart.ChartFactory;
import org.jfree.data.general.DefaultPieDataset;

public class PaiChart extends Chart {

	DefaultPieDataset dataset;

	public PaiChart(String title, String xLabel, String yLabel) {
		super(title, xLabel, yLabel);
		dataset = new DefaultPieDataset();
	}

	@Override
	public void createChart() {
		chart = ChartFactory.createPieChart(title, dataset, true, true, true);
	}

	@Override
	public void addValue(String catagory, String label, Number value) {
		dataset.setValue(label, value);
		
	}

	@Override
	public void addValue(String catagory, String label, double value) {
		dataset.setValue(label, value);
	}
	
}
